package com.huaboot.commont.page;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 统一分页入参对象
 * @Author ff
 * @Date 2023/8/12 8:44 下午
 * @Version 1.0
 */
@Data
public class BasePageQuery {
    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码最小值为 1")
    public Integer currentPage;

    @NotNull(message = "每页条数不能为空")
    @Range(min = 1, max = 1000, message = "每页条数，取值范围 1-1000")
    public Integer size;
}
